import org.junit.*;
import org.junit.runner.*;
import org.junit.runner.notification.*;
import static org.junit.Assert.*;

public class FrontBackSplitTest {

    public static void main(String[] args) {
        Result result = JUnitCore.runClasses(FrontBackSplitTest.class);
        for (Failure failure : result.getFailures()) {
            System.out.println(failure.getTestHeader() + ": " + failure.getMessage());
        }
        System.out.println(result.wasSuccessful());
    }

    @Before
    public void setUp() {
    }

    @After
    public void tearDown() {
    }

    @Test
    public void test1() {
        FrontBackSplit<Integer> list = new FrontBackSplit<Integer>();
        list.add(11);
        list.add(7);
        list.add(5);
        list.add(3);
        list.add(2);

        assertEquals("2. Front back split", "2 3 5, 7 11", list.split());
    }

    @Test
    public void test2() {
        FrontBackSplit<Integer> list = new FrontBackSplit<Integer>();
        list.add(11);
        list.add(7);
        list.add(5);
        list.add(3);

        assertEquals("2. Front back split", "3 5, 7 11", list.split());
    }

}


